package com.lrkj.workorder.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lrkj.common.annotation.Excel;
import com.lrkj.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 工单日志对象 tb_work_order_log
 *
 * @author yajun_ren
 * @date 2022-04-25
 */
@Data
public class WorkOrderLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识 */
    private String id;

    /** 工单ID */
    @Excel(name = "工单ID")
    private String workOrderId;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private String operationType;

    /** 操作人ID */
    @Excel(name = "操作人ID")
    private String operationPersonId;

    /** 操作人名称 */
    @Excel(name = "操作人名称")
    private String operationPersonName;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;

    /** 内容描述 */
    @Excel(name = "内容描述")
    private String operationContent;

    public WorkOrderLog(){}

    /***
     * @param workOrderId
     * @param operationType
     * @param operationContent
     * **/
    public WorkOrderLog(String workOrderId,String operationType,String operationContent){
        this.workOrderId = workOrderId;
        this.operationType = operationType;
        this.operationContent = operationContent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workOrderId", getWorkOrderId())
            .append("operationType", getOperationType())
            .append("operationPersonId", getOperationPersonId())
            .append("operationPersonName", getOperationPersonName())
            .append("operationTime", getOperationTime())
            .append("operationContent", getOperationContent())
            .toString();
    }
}
